package com.mars.boss.weixin.mapper;

import java.util.List;

import com.mars.base.mybatis.BaseMapper;
import com.mars.boss.weixin.entity.WxMenu;
import com.mars.boss.weixin.exception.WxMenuBizException;

public interface WxMenuMapper extends BaseMapper<WxMenu, Long> {
	
	/**
	 * 加载所有一级节点
	 * @return
	 * @throws MenuBizException
	 */
	List<WxMenu> loadRootNode() throws WxMenuBizException ;
	
	/**
	 * 根据ID加载子节点
	 * @return
	 * @throws MenuBizException
	 */
	List<WxMenu> loadChildrenNode(Long pid) throws WxMenuBizException ;
	
	/**
	 * 根据Key加载数据
	 * @param key
	 * @return
	 * @throws WxMenuBizException
	 */
	WxMenu selectMenyByKey(String key) throws WxMenuBizException ;
	
}